1. Field of the Invention
The invention relates to filter banks, and more particularly to filter bank which is implemented by a firmware program.
2. Description of the Related Art
A filter bank is made up of a plurality of filters. Because the filtration bandwidth of an individual filter is low, a signal with higher frequency bandwidth is often filtered via a filter bank comprising a plurality of filters, each filtering a frequency range with a lower bandwidth. Thus, in more complex signal processing systems signals are frequently filtered via a filter bank. For example, a conventional equalizer comprises a filter bank including several tens of filters for processing signals.
FIG. 1 is a flowchart of a conventional method 100 for operating a filter bank. The filter bank includes K filters. In step 102, a sample of an input signal is filtered by the first filter of the filter bank, and is then sequentially filtered by a second filter to a K-th filter of the filter bank in steps 102 to 10k. If the filter bank needs to filter a next sample of the input signal in step 110, the next sample is delivered to the first filter for filtration in step 102, otherwise, method 100 ends.
Ordinary filters are implemented with hardware circuits. Software programs handle digital signals with lower complexity and thus, are more convenient. A variety of current digital signal filters have been implemented with software or firmware programs. The filtration process of a firmware filter can be expressed as equation (1). A filtered output sample Y0k is expressed as output of equation (1) with input variables of a current input sample X0k, a series of previous input samples Xik previous to the current input sample, and a series of previous output samples Yjk corresponding to the previous input samples, wherein k is a filter index, and i and j are sample sequences of input samples and output samples numbered from the current input sample and greater than 0. The filter equation is shown below:Y0k=(a0k×X0k+a1k×X1k+ . . . +aMk×XMk)+(b1k×Y1k+b2k×Y2k+ . . . +bNk×YNk);   (1)                wherein aMk is a parameter of the M-th previous input sample, and bNk is a parameter of the N-th previous output sample. If M is equal to N, both M and N can be presented as the order of the filter equation.        
FIG. 2 is a flowchart of a conventional method 200 for filtering samples with a firmware filter executed by a processor. First, a current output sample Y0k is generated in step 202 according to the filter equation (1) with the input variables of a current input sample X0k, a series of previous input samples Xik, and a series of previous output samples Yjk. The variables of the filter equation must be updated previous to the generation of each output sample. For example, a current input sample X0k will become a previous input sample X1k for generating the next output sample, and a current output sample Y0k will become a previous output sample Y1k for generating the next output sample. Thus, the input variables of the filter equation (1) are updated with the current input sample and the current output sample in step 204. For example, the input variables of the filter equation (1), including input samples X1k ˜XMk and output samples Y1k˜YNk for generating the previous output sample Y1k, are updated with input samples X0k˜XM−1k and output samples Y0k˜YN−1k for generating the current output sample Y0k. Thus, (M+N) input variables are updated in step 204. If a next input sample is not yet processed by the filter equation in step 210, the next input sample is filtered according to the filter equation in step 206, otherwise, the method 200 ends.
The steps 102˜10k of method 100 in FIG. 1 can be implemented according to the steps 202 and 204 of method 200 of FIG. 2. Because (M+N) input variables must be updated in step 204, processor resources are squandered on updating the input variables. When a filter bank filters a signal with k filters, a sample of the signal requires the input variable to be updated K×(M+N) times. Thus, the time required to update input variables of filter equations is increased with an increase in the orders of the filter equations and the number of filters included in a filter bank. According to empirical experimental statistics, a filter bank exhausts one third of the total signal filtration time on updating variables of filter equations in the filters. Thus, the great amount of time spent updating variables of filter equations severely affects filter bank performance.